package organization;

import java.io.Serializable;

import person.Teacher;

public class Auditorium implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6L;
	private int number;
 	private int floor;
	private boolean getStatus;
	private Teacher teacher;
	
	public Auditorium (int number, int floor){
		this.number = number;
		this.floor = floor;
		getStatus = true;
		System.out.println("Room added."+"Number "+this.number+". Floor "+this.floor+".");
	}
	public void useRoom (Teacher teacher){
		getStatus =  false;
		this.teacher = teacher;
		System.out.println("Room "+number+" booked by "+teacher.getFirstName()+" "+teacher.getSecondName()+".");
	}
	public boolean getStatus(){
		if (getStatus == false){
			System.out.println("Booked by "+ teacher.getFirstAndScndName());
		}
		return getStatus;
	}
	public void freeRoom (){
		teacher = null;
		getStatus = true;
	}
	public int getNumber (){
		return number;
	}
	public int getFloor(){
		return floor;
	}
	public boolean equals (int number){
		if (number == this.number){
			return true;
		}
		return false;
	}
	
	
}
